package com.wunong.smart.commission.application.request.support;

import com.wunong.smart.commission.application.request.BaseCommissionRequest;
import com.wunong.smart.domain.platform.common.BizSource;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 创建代办
 *
 * @author create by zealot.zt
 */
@Getter
@Setter
@ToString(callSuper = true)
public class CommissionEntryRequest extends BaseCommissionRequest {

    /**
     * 业务信息
     */
    private BizSource source;

    /**
     * 类型
     */
    private String commissionType;

    public static CommissionEntryRequest of(CreateCommissionRequest commissionRequest) {
        CommissionEntryRequest entryRequest = new CommissionEntryRequest();
        entryRequest.initBasic(commissionRequest);

        entryRequest.setUserId(commissionRequest.getUserId());
        entryRequest.setSource(commissionRequest.getSource());
        entryRequest.setCommissionType(commissionRequest.getCommissionType());

        return entryRequest;
    }

}
